 <div class="row form-group ">
    <div class="col-sm-2">
        <div class="input-group">
            <label class="input-group-addon required">名称:</label>
            <input type="text" class="form-control" name="host_name" value="{{$name|html}}" required pattern="[\w-]+">
            <input type="hidden" name="host_name_orig" value="{{$name}}">
        </div>
    </div>
    
   <div class="col-sm-6">
    <div class="input-group" title="后端服务url地址,如: http://10.10.10.10/myapi/&#10;类似于 nginx的 proxy_pass 指令">
        <label class="input-group-addon required">网址:</label> 
        <input type="text" class="form-control" name="host_url" value="{{$host.URLStr|html}}" required="required"  pattern="^http(s?)://.+" >
    </div>
   </div>
   <div class="col-sm-2">
    <div class="input-group">
        <label class="input-group-addon">备注:</label> 
        <input type="text" class="form-control" name="host_note" value="{{$host.Note|html}}" >
    </div>
   </div>
   
   <div class="col-sm-1">
       <div class="input-group checkbox">
        <label>
            <input  type="checkbox" class="my-checkbox" data-name="host_enable" value="1" {{if $host.Enable}}checked=checked{{end}}>
            启用
        </label>
       </div>
   </div>
   <div class="col-sm-1">
       <div class="input-group checkbox">
         {{if $.userCanEdit}}
         <a href="#" onclick="proxy_api_host_delete(this);return false;">X</a>
         {{end}}
       </div>
   </div>
    <input type="hidden" name="sort_index" value="{{$host.SortIndex}}">
 </div>